<%-- 
    Document   : jczinfo
    Created on : 2017-3-22, 11:16:18
    Author     : chang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta charset="utf-8" />
<title>检测站详细信息</title>
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link type="text/css" rel="stylesheet" href="<c:url value="/css/layout.css"/>"/>
<script type="text/javascript" src="<c:url value="/js/jquery-2.1.4.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jquery-weui.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/frame-weui.js"/>" ></script>
<link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=3061fc42ab634d52fa3bb57d70ac50cf&plugin=AMap.Geocoder"></script>
<script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
</head>

<body onload="regeocoder()">
    <input type="hidden" id="zb_jd" value="${jd.value}" />
    <input type="hidden" id="zb_wd" value="${wd.value}" />
<div>
    <div class="alipay_map2" id="container" style="width: 100%;height: 35%">
<!--      <img src="<c:url value="/images/map2.png"/>" alt="">-->
  </div>
  <div id="tip">
            <b>所在位置:</b>
            <span id="result"></span>
  </div>
  <div class="alipay_jcz_name" style="margin-top: 230px">
      <h2><span><c:out value="${jcz.value.jczm.value}"></c:out></span></h2>
  </div>
  <div class="alipay_jcz_info">
    <div class="alipay_jcz_addtel">
      <ul>
        <li class="add">地址：<c:out value="${jcz.value.dlwz.value}"></c:out></li>
        <li class="tel">电话：<c:out value="${jcz.value.lxdh.value}"></c:out></li>
      </ul>
    </div>
    <div class="clear"></div>
  </div>
  <div class="alipay_jg"></div>
  <div class="alipay_jcz_info">
    <div class="alipay_jcz_ms">
      <dl>
        <dd><em>检测线数量：</em><c:out value="${jcz.value.jxcsl.value}"></c:out></dd>
        <dd><em>检测范围：</em><c:out value="${jcz.value.jcfw.value}"></c:out></dd>
        <dd><em>检测能力：</em><c:out value="${jcz.value.jcnl.value}"></c:out></dd>
        <dd><em>设备情况：</em><c:out value="${jcz.value.sbqk.value}"></c:out></dd>
        <dd><em>可预约车辆数：</em><c:out value="${jcz.value.kyycls.value}"></c:out></dd>
      </dl>
    </div>
  </div>
  <div class="alipay_jg"></div>
  <div class="alipay_yuyue">
      <input type="button" class="alipay_yuyue_an" value="预约" onclick="yy();">
  </div>
</div>
</body>
<script>
    function yy(){
        var jczm = '${jcz.value.jczm.value}';
        var bm = encodeURI(encodeURI(jczm));
        location.href="<%=request.getContextPath()%>/wx/_page/yuyue.do?service_code=S90003&jczm="+bm+"&jyjgbh=${jcz.value.jyjgbh.value}";
    }
    var map = new AMap.Map("container", {
            resizeEnable: true,
            zoom: 0
        }),
        rczb_jd = document.getElementById("zb_jd").value;
        rczb_wd = document.getElementById("zb_wd").value;
        lnglatXY = [rczb_wd, rczb_jd];
        function regeocoder() {  //逆地理编码
            var geocoder = new AMap.Geocoder({
                radius: 1000,
                extensions: "all"
            });
            geocoder.getAddress(lnglatXY, function(status, result) {
                if (status === 'complete' && result.info === 'OK') {
                    geocoder_CallBack(result);
                }
            });
            var marker = new AMap.Marker({//加点
                map: map,
                position: lnglatXY
            });
            map.setFitView();
        }
        function geocoder_CallBack(data) {
            var address = data.regeocode.formattedAddress; //返回地址描述
            document.getElementById("result").innerHTML = address;
        }
</script>
</html>
